module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    clean: {
      dist: ['dist']
    },
    concat: {
      options: {
        separator: ';',
        stripBanners: true
      },
      dist: {
        src: ['cordova.js', 'cordova_plugins.js', 'plugins/**/*.js'],
        dest: '../dist/rhMobileSdk_android.js'
      }
    },
    uglify: {
      options: {
        mangle: true
      },
      my_target: {
        files: { '../dist/rhMobileSdk_android.min.js': '../dist/rhMobileSdk_android.js' }
      }
    }
  })

  grunt.loadNpmTasks('grunt-contrib-clean')
  grunt.loadNpmTasks('grunt-contrib-concat')
  grunt.loadNpmTasks('grunt-contrib-uglify')

  grunt.registerTask('default', ['clean', 'concat', 'uglify'])
}
